package com.usian.admin.controller.v1;

import com.usian.admin.service.AdUserService;
import com.usian.apis.admin.AdUserControllerApi;
import com.usian.model.admin.dtos.AdUserDto;
import com.usian.model.admin.pojos.AdUser;
import com.usian.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * ClassName: AdUserController
 * Author:   WGG
 * Date:    2022-11-2022/11/11-11:49
 * Version: 1.0
 * Description:
 */
@RestController
@RequestMapping("/admin/login")
@Api(value = "登录",tags = "login",description = "登录API")
public class AdUserController implements AdUserControllerApi {

    @Autowired
    private AdUserService adUserService;

    /**
     * 登录
     * @param adUserDto
     * @return
     */
    @Override
    @PostMapping("/in")
    public ResponseResult login(@RequestBody AdUserDto adUserDto) {
        return adUserService.login(adUserDto);
    }
}
